#ifndef MineCraftBlock_H
#define MineCraftBlock_H

#include <QQuick3DGeometry>
#include <QVariantList>
#include <QtQmlIntegration>
#include <minecraftblocklibrary.h>

class MineCraftBlockGeometry:public QQuick3DGeometry
{
    Q_OBJECT
    QML_ELEMENT
public:
    MineCraftBlockGeometry();

    BlockMeta::BlockType type() const;
    void setType(const BlockMeta::BlockType &newType);

signals:
    void typeChanged();

private:
    void rebuild();
private:
    BlockMeta::BlockType m_type = BlockMeta::None;
    Q_PROPERTY(BlockMeta::BlockType type READ type WRITE setType NOTIFY typeChanged FINAL)
};
#endif
